import javax.swing.*;
import java.awt.*;

/**
 * @author Lei
 * @create 2022-05-22 15:38
 */
public class GUI {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(()->{
            Library UL = new Library("UIC Library");


            ControllerCreate controllerCreate = new ControllerCreate(UL);
            //Create and set up the window.
            ViewCreate viewCreate = new ViewCreate(UL, controllerCreate);



            ControllerGetBook controllerGetBook = new ControllerGetBook(UL);
            //Create and set up the window.
            ViewGetBook viewGetBook = new ViewGetBook(UL, controllerGetBook);
            //Display the window.
            viewGetBook.pack();
            viewGetBook.setVisible( true );

            ControllerMoreBook controllerMoreBook = new ControllerMoreBook(UL);
            //Create and set up the window.
            ViewMoreBook viewMoreBook = new ViewMoreBook(UL, controllerMoreBook);
            //Display the window.
            viewMoreBook.pack();
            viewMoreBook.setVisible( true );


            ControllerHistory controllerHistory = new ControllerHistory(UL);
            //Create and set up the window.
            ViewHistory viewHistory = new ViewHistory(UL, controllerHistory);
            //Display the window.
            viewHistory.pack();
            viewHistory.setVisible( true );
        });
    }
}
